# class把数据和函数结合在一起

class TongXue:
    """代表一名同学"""
    def __init__(self, name, weight):
        self.name = name
        self.weight = weight
    
    def show_weight(self):
        print(f"{self.name} 同学的体重是 {self.weight} 千克.")

txXB = TongXue("Xiao Bao", 42)
txYY = TongXue("Yuan Yuan", 55)

txXB.show_weight()
txYY.show_weight()